﻿using System;
using System.Diagnostics;
using System.Windows.Forms;

namespace HYFamilyLibDataManager
{
	public class Watch
	{
		public void Start(string message)
		{
			this.mess = message;
			MessageBox.Show(this.mess + "开始执行。");
			this.sw = new Stopwatch();
			this.sw.Start();
		}

		public void Stop()
		{
			this.sw.Stop();
			MessageBox.Show(this.mess + "运行完毕。耗时：" + this.sw.ElapsedMilliseconds.ToString() + "毫秒。");
		}

		private Stopwatch sw = new Stopwatch();

		private string mess;
	}
}
